(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

plus_x#1(0, x8) → x8
plus_x#1(S(x12), x14) → S(plus_x#1(x12, x14))
map#2(plus_x(x2), Nil) → Nil
map#2(plus_x(x6), Cons(x4, x2)) → Cons(plus_x#1(x6, x4), map#2(plus_x(x6), x2))
main(x5, x12) → map#2(plus_x(x12), x5)

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
map#2(plus_x(z0), Nil) → Nil
map#2(plus_x(z0), Cons(z1, z2)) → Cons(plus_x#1(z0, z1), map#2(plus_x(z0), z2))
main(z0, z1) → map#2(plus_x(z1), z0)
Tuples:

PLUS_X#1(0, z0) → c
PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Nil) → c2
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
MAIN(z0, z1) → c4(MAP#2(plus_x(z1), z0))
S tuples:

PLUS_X#1(0, z0) → c
PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Nil) → c2
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
MAIN(z0, z1) → c4(MAP#2(plus_x(z1), z0))
K tuples:none
Defined Rule Symbols:

plus_x#1, map#2, main

Defined Pair Symbols:

PLUS_X#1, MAP#2, MAIN

Compound Symbols:

c, c1, c2, c3, c4

(3) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

MAIN(z0, z1) → c4(MAP#2(plus_x(z1), z0))
Removed 2 trailing nodes:

PLUS_X#1(0, z0) → c
MAP#2(plus_x(z0), Nil) → c2

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
map#2(plus_x(z0), Nil) → Nil
map#2(plus_x(z0), Cons(z1, z2)) → Cons(plus_x#1(z0, z1), map#2(plus_x(z0), z2))
main(z0, z1) → map#2(plus_x(z1), z0)
Tuples:

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
S tuples:

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
K tuples:none
Defined Rule Symbols:

plus_x#1, map#2, main

Defined Pair Symbols:

PLUS_X#1, MAP#2

Compound Symbols:

c1, c3

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

plus_x#1(0, z0) → z0
plus_x#1(S(z0), z1) → S(plus_x#1(z0, z1))
map#2(plus_x(z0), Nil) → Nil
map#2(plus_x(z0), Cons(z1, z2)) → Cons(plus_x#1(z0, z1), map#2(plus_x(z0), z2))
main(z0, z1) → map#2(plus_x(z1), z0)

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
S tuples:

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

PLUS_X#1, MAP#2

Compound Symbols:

c1, c3

(7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
We considered the (Usable) Rules:none
And the Tuples:

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(Cons(x1, x2)) = [1] + x2   
POL(MAP#2(x1, x2)) = x2   
POL(PLUS_X#1(x1, x2)) = 0   
POL(S(x1)) = 0   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(plus_x(x1)) = 0   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
S tuples:

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
K tuples:

MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
Defined Rule Symbols:none

Defined Pair Symbols:

PLUS_X#1, MAP#2

Compound Symbols:

c1, c3

(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(Cons(x1, x2)) = [1] + x1 + x2   
POL(MAP#2(x1, x2)) = x1·x2   
POL(PLUS_X#1(x1, x2)) = x1   
POL(S(x1)) = [1] + x1   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(plus_x(x1)) = x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
S tuples:none
K tuples:

MAP#2(plus_x(z0), Cons(z1, z2)) → c3(PLUS_X#1(z0, z1), MAP#2(plus_x(z0), z2))
PLUS_X#1(S(z0), z1) → c1(PLUS_X#1(z0, z1))
Defined Rule Symbols:none

Defined Pair Symbols:

PLUS_X#1, MAP#2

Compound Symbols:

c1, c3

(11) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(12) BOUNDS(1, 1)